# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import HttpResponse

from  .models import Category
from django.shortcuts import render

# Create your views here.

import json
def test(requste):
    res =Category.objects.all()
    content= []
    for item in res:
        content.append(item.getattrs())
    return HttpResponse(json.dumps(content))

    # for item in res:
    #     content.append(item.getattrs())
    # return HttpResponse(content)

